<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%><%@ include file="/include/commons.jsp"%>
<c:set var="saveType" value="save"></c:set>
<c:if test="${op eq 'modify'}">
	<c:set var="saveType" value="update"></c:set>
</c:if>
<<script type="text/javascript">
<!--
	var editor1;
//	$(function(){
//		 editor1 = KindEditor.create('#editor', {
//			  width:'97%',height:'200px',langType:'zh_CN',
//			  allowFileUpload:false,allowMediaUpload:false,
			//  cssPath : 'kindeditor/plugins/code/prettify.css',
//			  uploadJson:'html/resources/kindeditor/jsp/upload_json.jsp',
//			  items : KE_simple
//			});
//	});
//-->
</script>
<h2 class="contentTitle">添加部门</h2>
<form method="post" action="sys/depts/add.action?op=${saveType}&navTabId=deptLiNav&callbackType=closeCurrent" class="required-validate pageForm" onsubmit="return validateCallback(this, navTabAjaxDone);">
	<input type="hidden" name="dept.deptId" value="${dept.deptId}">
	<input type="hidden" name="dept.companyId" value="${dept.companyId}">
	<div class="pageFormContent" layoutH="97">
		<h3>基本资料</h3>
		<div class="divider"></div>
		<table>
			<tbody>
				<tr>
					<td><label>部门名称：</label></td>
					<td><input type="text" name="dept.deptName" value="${dept.deptName}" class="required" minlength="2" maxlength="100" title="请填写部门名称"/></td>
					<td><label>上级部门：</label></td>
					<td><input type="text" name="dept.parentDeptId" value="${dept.parentDeptId}" class=""/></td>
					<td><label>部门类型：</label></td><td>
					<select name="dept.deptType">
					<c:forEach items="${deptType}" var="item">
						<option value="${item.value}">${item.name}</option>
					</c:forEach>
					</select></td>
				</tr>
				<tr>
					<td style="vertical-align: top;"><label>部门简介：</label></td>
					<td colspan="5"><textarea id="editor" rows="5" cols="96" name="deptBrief">${deptBrief}</textarea></td>
				</tr>
			</tbody>
		</table>
	</div>
			
	<div class="formBar">
		<ul>
			<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
			<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
		</ul>
	</div>
</form>